<!doctype html>
<html lang="en">
	<head>
		<meta charset="UTF-8" />
		<link rel="icon" type="image/svg+xml" href="/vite.svg" />
		<meta name="viewport" content="width=device-width, initial-scale=1.0" />
		<!-- 禁止缩放 -->
		<!-- <meta
      name="viewport"
      content="width=device-width, initial-scale=1.0,maximum-scale=1.0,viewport-fit=cover, user-scalable=no"
    /> -->
		<title>Vite + Vue</title>
	</head>
	<body>
		<div id="app"></div>
		<script type="module" src="/src/main.js"></script>
		<script type="text/javascript">
			// 禁用缩放
			document.documentElement.addEventListener(
				'touchstart',
				(event) => {
					if (event.touches.length > 1) {
						event.preventDefault()
					}
				},
				{ passive: false }
			)

			// 禁用双击放大
			let lastTouchEnd = 0
			document.documentElement.addEventListener(
				'touchend',
				(event) => {
					let now = Date.now()
					if (now - lastTouchEnd <= 300) {
						event.preventDefault()
					}
					lastTouchEnd = now
				},
				{
					passive: false
				}
			)

			// 禁用双指手势操作
			document.addEventListener('gesturestart', function (event) {
				event.preventDefault()
			})
		</script>
	</body>
</html>
<script>
	// let width = Math.min(document.body.clientWidth, 750);
	// let fontSize = (width / 750) * 100;
	// document.documentElement.style.fontSize = fontSize + 'px';
	// console.log(
	//   '%c [  ]-11',
	//   'font-size:13px; background:pink; color:#bf2c9f;',
	//   fontSize,
	//   width
	// );
	// document.body.onresize = () => {
	//   let width = Math.min(document.body.clientWidth, 750);
	//   let fontSize = (width / 750) * 100;
	//   document.documentElement.style.fontSize = fontSize + 'px';
	//   console.log(
	//     '%c [  ]-11',
	//     'font-size:13px; background:pink; color:#bf2c9f;',
	//     fontSize,
	//     width
	//   );
	// };
</script>
